package com.atguigu.observer.improve;

public class BaiduSite implements Observer {
    private float temperature;

    private float pressure;

    private float humidity;

    public void update(float temperature, float pressure, float humidity) {
        this.temperature = temperature;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }

    public void display() {
        System.out.println("===百度网站====");
        System.out.println("百度网站气温:\t" + temperature);
        System.out.println("百度网站气压:\t" + pressure);
        System.out.println("百度网站湿度:\t" + humidity);
    }
}
